package exp3;

public class MyBook {
    private String bookname;
    String author;
    String press;
    String copyrightdate;

    public MyBook(String name, String auth, String pre, String copyright){
        setBookname(this, name);
        author = auth;
        press = pre;
        copyrightdate = copyright;
    }

    public static void setBookname(MyBook myBook, String name){
        myBook.bookname = name;
    }
    public String getBookname() {
        return bookname;
    }

    public void setAuthor(String auth){
        author = auth;
    }
    public String getAuthor() {
        return author;
    }

    public void setPress(String pre){
        press = pre;
    }
    public String getCopyrightdate() {
        return copyrightdate;
    }

    @Override
    public String toString() {
        return "\tBooknme: " + getBookname() + "\n\tAuthor: " +
                author + "\n\tPress: " + press + "\n\tCopyrightdate: " + copyrightdate;
    }
}
